/* 开源安全创意工坊 - 自定义样式 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 任务看板样式 */
.task-board {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.task-column {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
}

.task-column h5 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.task-card {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.task-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.task-card h6 {
    font-weight: 600;
    margin-bottom: 5px;
}

.task-card .badge {
    font-size: 0.75rem;
}

.task-card .task-actions {
    margin-top: 8px;
}

/* 拖拽区域样式 */
.drag-over {
    background-color: #e3f2fd;
    border: 2px dashed var(--primary-color);
}

/* 项目卡片样式 */
.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card .card-text {
    flex-grow: 1;
}

/* 安全贴士样式 */
.security-tip-card {
    transition: all 0.3s ease;
}

.security-tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.security-tip-card .card-header {
    background: linear-gradient(135deg, var(--info-color), var(--primary-color));
    color: white;
}

/* 轮播图样式 */
.carousel-item {
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-caption {
    background: rgba(0,0,0,0.7);
    border-radius: 8px;
    padding: 20px;
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
}

/* 徽章样式 */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* 进度条样式 */
.progress {
    border-radius: 8px;
    height: 8px;
}

.progress-bar {
    border-radius: 8px;
}

/* 模态框样式 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    background-color: var(--primary-color);
    color: white;
}

/* 警告框样式 */
.alert {
    border-radius: 8px;
    border: none;
}

/* 表格样式 */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    border-top: none;
}

/* 代码块样式 */
pre {
    border-radius: 8px;
    background-color: #f8f9fa;
    padding: 15px;
    border: 1px solid #dee2e6;
}

code {
    color: var(--primary-color);
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .task-column {
        margin-bottom: 20px;
    }
    
    .carousel-item {
        height: 250px;
    }
    
    .card {
        margin-bottom: 15px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 面包屑样式 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 文件上传样式 */
.custom-file-input:lang(zh) ~ .custom-file-label::after {
    content: "浏览";
}

/* 开关样式 */
.custom-switch .custom-control-label::before {
    border-radius: 1rem;
}

/* 标签页样式 */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    margin-right: 2px;
    border: none;
    color: var(--secondary-color);
}

.nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* 统计卡片样式 */
.stats-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stats-card .stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* 响应式字体大小 */
@media (max-width: 576px) {
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .card-header h3, .card-header h5 {
        font-size: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar, .footer, .btn, .task-actions {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
